<script setup>
import { ref, reactive } from 'vue'

const num = ref(0)
const state = reactive({ name: 'Vue 3' })

function updateData() {
  num.value = 10
  state.name = 'Updated Vue 3'
}
</script>

<template>
  <div>
    <p>数字: {{ num }}</p>
    <p>状态: {{ state.name }}</p>
    <button @click="updateData">更新数据</button>
  </div>
</template>